package leetcode.code2037;

import java.util.Arrays;

public class Solution {
	public int minMovesToSeat(int[] seats, int[] students) {
		Arrays.sort(seats);
		Arrays.sort(students);
		int ans = 0;
		for (int i = 0; i < students.length; i++) {
			ans += Math.abs(seats[i] - students[i]);
		}
		return ans;
	}
}
